<?php
    echo $this->Html->css('jquery-ui-1.10.2.custom');
    echo $this->Html->css('ui.multiselect');
    echo $this->Html->script('jquery-1.9.1'); 
    echo $this->Html->script('jquery-ui-1.10.2.custom');
    echo $this->Html->script('plugins/localisation/jquery.localisation-min');
    echo $this->Html->script('plugins/scrollTo/jquery.scrollTo-min');
    echo $this->Html->script('ui.multiselect');
    echo $this->Html->script('instituicao');
?>
<form id="frmCadastroRespTecnicos" action="/siscel/instituicaoLabs/resptecnicos/<?php echo $id ?>" method="post">
    <table style="width:900px;">
        <tr>
            <td>
                <?php echo $this->Form->input('ResponsavelInstituicaoServico.CO_SERVICO', array('type' => 'select', 'class'=>'', 'label' => 'Serviço', 'id' => 'CO_SERVICO', 'options'=> $arrServicos )); ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php echo $this->Form->input('resptecnicos', array('type' => 'select', 'class'=>'multiselect', 'multiple'=>'multiple', 'label' => 'Responsáveis técinos', 'id' => 'resptecnicos', 'options' => $arrRespTec, 'selected' => $arrRespTecMarcados )); ?>
            </td>
        </tr>
        <tr>
            <td>
                <div class="button">
                    <input  type="button" value="Enviar" onclick="Instituicao.gravarRespTecnicos();"/>
                </div>
                <div class="button">
                    <input  type="button" value="Novo" onclick="Instituicao.novoRespTecnicos(<?php echo $id ?>)"/>
                </div>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">
$(function(){
    // choose either the full version
    //$.localise('ui-multiselect', {/*language: 'en',*/ path: '../../app/webroot/js/locale/'});
    $(".multiselect").multiselect({sortable: true, searchable: false});
    $(".ui-multiselect").css('width','99%');
    $(".selected").css('width','49%');
    $(".available").css('width','49%');

    Instituicao.init();
});
</script>